﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Cn.Cellula.Model.System;
using Cn.Cellula.Model.Content;
using Cn.Edwon.Biz;
using Cn.Edwon.Web.Ac;

namespace Cn.Cellula.Biz.Port {
    public interface IItemBiz : IBiz {

        VItemListEO LoadItem(String rKey,String rOwnerKey, UserPower rPower);

        VItemDetailsEO LoadItemDetails(String rKey,String rOwnerKey, UserPower rPower);

        VSysAtlEO LoadAtl(String rKey, UserPower rPower);

        VItemAtlDataEO LoadAtlData(String rKey, String rOwnerKey, UserPower rPower);

        #region 属性模板
        /// <summary>
        /// 根据alt key获取options列表
        /// </summary>
        /// <param name="rAtlKey"></param>
        /// <returns></returns>
        IList<TSysAtlOptionsEO> LoadAltOptions(String rAtlKey);
        /// <summary>
        /// 删除一个或多个属性模板
        /// </summary>
        /// <param name="rAltKey"></param>
        void DeleteAlt(IList<String> rAltKeys);
        /// <summary>
        /// 删除一个或多个属性选择项
        /// </summary>
        /// <param name="rOptKey"></param>
        void DeleteAltOption(IList<String> rOptKeys);

        /// <summary>
        /// 根据分类获取所有的Item
        /// </summary>
        /// <param name="rCategoryKey"></param>
        /// <returns></returns>
        IList<VItemListEO> LoadItemByCategory(String rCategoryKey, String rOwnerKey, UserPower rPower);
        /// <summary>
        /// 保存属性值数据
        /// </summary>
        /// <param name="rDataList"></param>
        void SaveProductAtlData(IList<TItemAtlDataEO> rDataList);

        /// <summary>
        /// 根据分类加载属性的选择项
        /// </summary>
        /// <param name="rCategoryKey"></param>
        /// <returns></returns>
        IList<VSysAtlOptionsEO> LoadItemOptByCategory(string rCategoryKey);

        IList<VItemAtlDataEO> LoadAtlDataByItem(String rItemKey, String rOwnerKey, UserPower rPower);

        IList<VItemAtlDataEO> LoadAtlDataByCategory(String rCategoryKey, String rOwnerKey, UserPower rPower);
        /// <summary>
        /// 删除Item
        /// </summary>
        /// <param name="rKeys"></param>
        void DeleteItem(IList<String> rKeys);
        /// 根据分类获取所有的atl
        /// </summary>
        /// <param name="rCategoryKey"></param>
        /// <returns></returns>
        IList<VSysAtlEO> LoadSysAtlByCategory(String rCategoryKey, UserPower rPower);
        /// <summary>
        /// 列出所有用来搜素的ATL
        /// </summary>
        /// <param name="rCategoryKey"></param>
        /// <returns></returns>
        IList<VSysAtlEO> LoadSysAtlByQuery(string rCategoryKey,  UserPower rPower);
        /// 根据分类获取所有的atl options
        /// </summary>
        /// <param name="rCategoryKey"></param>
        /// <returns></returns>
        IList<VSysAtlOptionsEO> LoadSysAtlOptionsByCategory(string rCategoryKey);
        #endregion
    }
}
